#ifndef CAMERA_H
#define CAMERA_H

#include "drawable.h"
#include "updateable.h"
//#include "gameObject.h"

class Camera : public Drawable, public Updateable {
    private: 
    cpVect pos_;

	float hWidth;
	float hHeight;
	
	float aRatio;

	float speed;

	bool forwards;
	bool right;
	bool left;
	bool back;
	
	float angle;

	float rotate;

	bool rotateRight;
	bool rotateLeft;

	bool out;
	bool in;

	float zoomSpeed;
    
    public:
		Camera(cpVect pos, int width, int height) : Drawable(0) {
        pos_ = pos;
		speed = 0.03;

		angle = 0.0;
		rotate = 1.0;
		
		zoomSpeed = 0.03;
		
		forwards = false;
		back = false;
		left = false;
		right = false;
		
		rotateRight = false;
		rotateLeft = false;

		out = false;
		in = false;

		//Little change in the camera, make top negative, this will result in a
        //math-like axes: x goes right and y goes up
		hWidth = width / 2;
		hHeight = height / 2;
		
		aRatio = (hWidth) / (hHeight);
    }
    
    //inline bool isDrawable() {return true;}
    void draw();
    
    //inline bool isUpdateable() {return true;}
    void update(float step);
    
    inline cpVect getPos() {return pos_;}
    inline void setPos(cpVect pos) {pos_ = pos;}
	
	//Control Functions
	void moveForwards();
	void stopMoveForwards();

	void moveRight();
	void stopMoveRight();

	void moveLeft();
	void stopMoveLeft();

	void moveBack();
	void stopMoveBack();

	void spinRight();
	void stopSpinRight();

	void spinLeft();
	void stopSpinLeft();

	void zoomIn();
	void stopZoomIn();

	void zoomOut();
	void stopZoomOut();
};

#endif
